Skip to content

Add removeEmptyOnClose setting to auto-delete empty scratchpads#91

Open
ByScripts wants to merge 1 commit intobuenon:masterfrom
ByScripts:feat/remove-empty-scratch-on-close
Open

Add removeEmptyOnClose setting to auto-delete empty scratchpads#91
ByScripts wants to merge 1 commit intobuenon:masterfrom
ByScripts:feat/remove-empty-scratch-on-close

Conversation

@ByScripts
Copy link
Copy Markdown

This PR adds an option to remove an empty scratchpad when its tab is closed.

It mimics the behavior of JetBrains editors.

Extract `isScratchpadFile` and `deleteFileIfEmpty` helpers
into Utils and listen for tab-close events in the extension
activation to remove scratchpad files that are closed empty.
Copy link
Copy Markdown
Owner

@buenon buenon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
Thanks 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants